From 816742b640b0be28dbadb44bcbe11c39fda57ef2 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Sun, 10 Jun 2007 17:00:47 +0100 Subject: [PATCH] x86: Fix save_all regs macro for new CONFIG_FRAME_POINTER define. Signed-off-by: Keir Fraser --- xen/include/asm-x86/x86_32/asm_defns.h | 8 ++++++-- xen/include/asm-x86/x86_64/asm_defns.h | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-x86/x86_32/asm_defns.h b/xen/include/asm-x86/x86_32/asm_defns.h index b37f3c5a9b..6aac4cbf16 100644 --- a/xen/include/asm-x86/x86_32/asm_defns.h +++ b/xen/include/asm-x86/x86_32/asm_defns.h @@ -3,11 +3,16 @@ #include -#ifndef NDEBUG +#ifdef CONFIG_FRAME_POINTER /* Indicate special exception stack frame by inverting the frame pointer. */ #define SETUP_EXCEPTION_FRAME_POINTER \ movl %esp,%ebp; \ notl %ebp +#else +#define SETUP_EXCEPTION_FRAME_POINTER +#endif + +#ifndef NDEBUG #define ASSERT_INTERRUPT_STATUS(x) \ pushf; \ testb $X86_EFLAGS_IF>>8,1(%esp); \ @@ -15,7 +20,6 @@ ud2a; \ 1: addl $4,%esp; #else -#define SETUP_EXCEPTION_FRAME_POINTER #define ASSERT_INTERRUPT_STATUS(x) #endif diff --git a/xen/include/asm-x86/x86_64/asm_defns.h b/xen/include/asm-x86/x86_64/asm_defns.h index 231f3aa02e..e576e0315a 100644 --- a/xen/include/asm-x86/x86_64/asm_defns.h +++ b/xen/include/asm-x86/x86_64/asm_defns.h @@ -3,11 +3,16 @@ #include -#ifndef NDEBUG +#ifdef CONFIG_FRAME_POINTER /* Indicate special exception stack frame by inverting the frame pointer. */ #define SETUP_EXCEPTION_FRAME_POINTER \ movq %rsp,%rbp; \ notq %rbp +#else +#define SETUP_EXCEPTION_FRAME_POINTER +#endif + +#ifndef NDEBUG #define ASSERT_INTERRUPT_STATUS(x) \ pushf; \ testb $X86_EFLAGS_IF>>8,1(%rsp); \ @@ -15,7 +20,6 @@ ud2a; \ 1: addq $8,%rsp; #else -#define SETUP_EXCEPTION_FRAME_POINTER #define ASSERT_INTERRUPT_STATUS(x) #endif -- 2.30.2